import { Spin } from 'antd';
import { useSelector } from 'react-redux';
import { withRouter } from 'react-router-dom'
import style from './loading.module.scss'
const Loading = () => {
    const { loadingNum } = useSelector(state => state.loading)
    return (
        <>
            {
                loadingNum !== 0 && (<div className={style.loading_box}><Spin size="large" /></div>)
            }
        </>
    );
}

export default withRouter(Loading);